package com.cg.util.token;

import java.util.List;
import org.springframework.util.DigestUtils;
public class TokenEncryption {

    /**
     * @Author ZC
     * @Description //TODO 将传来的参数通过MD5加密 返回处理过的数据
     * @Date 16:09
     * @Param [objects]
     * @return java.lang.String
     **/
    public static void main(String[] args) {

        System.out.println(loginTokenEncryption("zc1125"));
    }
    public static String loginTokenEncryption(Object... objects ){

        StringBuffer strb = new StringBuffer();
        for (Object parameter :
                objects) {
            try {

                strb.append(DigestUtils.md5DigestAsHex(parameter.toString().getBytes()));
            }catch (Exception e){
                e.printStackTrace();
            }
        }
        return DigestUtils.md5DigestAsHex((strb.append("cc").toString().getBytes()));
    }
}
